package com.yupi.usercenter.service;

import com.yupi.usercenter.model.domain.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.usercenter.model.domain.User;
import com.yupi.usercenter.model.dto.TeamJoinRequest;
import com.yupi.usercenter.model.dto.TeamQuery;
import com.yupi.usercenter.model.dto.TeamUpdateRequest;
import com.yupi.usercenter.model.vo.TeamUserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author Administrator
* @description 针对表【team(队伍)】的数据库操作Service
* @createDate 2025-08-11 23:35:03
*/
public interface TeamService extends IService<Team> {

    long addTeam(Team team, User loginuser);

    /**
     * 获取我加入和管理的队伍列表
     * @param teamQuery
     * @param isAdmin
     * @return
     */
    List<TeamUserVO> listTeams(TeamQuery teamQuery, Boolean isAdmin);
/**
     * 更新队伍信息
     * @param team
     * @param loginUser
     * @return
     */
    boolean updateTeam(TeamUpdateRequest team, User     loginUser);
/**
     * 加入队伍
     * @param teamJoinRequest
     * @param httpServletRequest
     * @return
     */


    boolean joinTeam(TeamJoinRequest teamJoinRequest, HttpServletRequest httpServletRequest, User loginUser);
    /**
     * 退出队伍
     * @param teamJoinRequest
     * @param httpServletRequest
     * @return
     */
    Boolean quitTeam(TeamJoinRequest teamJoinRequest, HttpServletRequest httpServletRequest, User loginUser);

    boolean deleteTeam(Long id,User user);
}
